<%#
# To change this template, choose Tools | Templates
# and open the template in the editor.
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-BR" lang="pt-BR">
  <head>
    <title>Digital Music Store!</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="author" content="Gabriel Mazetto e Ramon Facchin" />
    <meta name="keywords" content="Digital Music Store Buy Digital Musics" />
    <link rel="stylesheet" type="text/css" href="/stylesheets/musicstore.css" media="screen" />
    <link rel="home" title="Start" href="/" />
    <%= javascript_include_tag :defaults %>
    <%= stylesheet_link_tag 'musicstore' %>
    <%= active_scaffold_includes %>
  </head>
  <body>
    <div class="corpo">
      <div class="avisos"><p style="color: green"><%= flash[:notice] %></p></div>
      <h1>Digital Music Store!</h1>
      <div class="navegacao">
        <ul id="globalnav">
          <% unless @current_user.blank? %>
            <li><a href="#">Olá <%= @current_user.name %></a></li>
            <li><%= link_to_remote 'Compre Creditos', :url => { :controller => 'credits', :action => 'buy' }, :method => :get, :update => 'buy_credits' %></li>
            <li><%= link_to 'Logout', { :controller => 'users', :action => 'logout' } %></li>
          <% else %>
            <li><%= link_to 'Crie sua Conta!', { :controller => 'users', :action => 'register' } %></li>
            <li><%= link_to 'Login', { :controller => 'users', :action => 'login' } %></li>
          <% end %>
        </ul>
      </div>
      <% unless @current_user.blank? %>
        <div id="buy_credits"></div>
      <% end %>
      
      <%= yield %>
      
    </div>
  </body>
</html>
